﻿using DevTeam;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;

/// <summary>
/// Summary description for FaturaServices
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class FaturaServices : System.Web.Services.WebService {

    public FaturaServices () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public DataTable IthalatFaturalariniAl(string KullaniciAdi, string Parola, DateTime SonEklenmeTarihi)
    {
        //if (authenticated)
        if (KullaniciAdi == "karbel" && Parola == "karbel")
        {
            DataManager dm = new DataManager("Data Source=karbelerp.karbel.com,1430;Initial Catalog=ConfExpert;Persist Security Info=True;Integrated Security=False;User ID=CEUser;Password=1034!1518");
            DataTable dt = dm.ExecuteDataTable("FS_GetAlisFaturasi", SonEklenmeTarihi);
            return dt;
        }
        else
            return null;
    }
    
}
